<html>
<head><meta charset="utf-8"><title>Suppressing lints for generated impls · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Suppressing.20lints.20for.20generated.20impls.html">Suppressing lints for generated impls</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="196237768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Suppressing%20lints%20for%20generated%20impls/near/196237768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Suppressing.20lints.20for.20generated.20impls.html#196237768">(May 04 2020 at 20:45)</a>:</h4>
<p>Is there a good way to <code>#[allow]</code> a lint for a generated impl, that also works in the presence of an outer <code>#[forbid]</code>?</p>



<a name="196237934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Suppressing%20lints%20for%20generated%20impls/near/196237934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Suppressing.20lints.20for.20generated.20impls.html#196237934">(May 04 2020 at 20:47)</a>:</h4>
<p>The built-in derives seem to have such a mechanism, for example they won't fire the <code>deprecated</code> lint even though the generated impl would otherwise trigger it.</p>



<a name="196237989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Suppressing%20lints%20for%20generated%20impls/near/196237989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Suppressing.20lints.20for.20generated.20impls.html#196237989">(May 04 2020 at 20:47)</a>:</h4>
<p>Or is the <code>deprecated</code> lint looking at the span of the impl?</p>



<a name="196238507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Suppressing%20lints%20for%20generated%20impls/near/196238507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Suppressing.20lints.20for.20generated.20impls.html#196238507">(May 04 2020 at 20:51)</a>:</h4>
<p>Huh, they also attach <code>#[allow(unused_qualifications)]</code> to the impl, but that does break when <code>#[forbid(unused_qualifications)]</code> is present</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>